package cn.java79.quiz.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author oldliu
 * @since 1.0
 */
@Controller
//demo/sayhi
@RequestMapping("demo")
public class HelloController {

    @RequestMapping("sayhi")
//    @GetMapping
//    @PostMapping
    public ModelAndView sayHello(){
        ModelAndView mv=new ModelAndView();
        mv.addObject("msg","赵春利今年21了");
        mv.setViewName("forward:/hello.jsp");
        return mv;
    }
}
